package com.tencent.wxcloudrun.frontcontroller;

import com.tencent.wxcloudrun.dto.*;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author lichongbing
 * @version 1.0.0
 * @createdate 2023/3/4 19:20
 * @description: TODO
 */
@RestController
@Api(tags = "公告模块")
public class NoticeController {
    /**
     * 关于信息
     */
    @Operation(summary = "关于信息")
    @GetMapping("/wxcloud/cmsPage")
    CmsPageResponse cmsPage(HttpServletRequest request) {
        return null;
    }
    /**
     * 获取最新的一个公告
     */
    @Operation(summary = "获取最新的一个公告")
    @PostMapping("/wxcloud/noticeLastOne1")
    NoticeLastOneResponse noticeLastOne(HttpServletRequest request, @RequestBody String json){
        return null;

    }
    @PostMapping("/wxcloud/noticeLastOne")
    String test(){
        return "{\"code\":0,\"data\":{\"content\":\"<p>老店新开，欢迎新老客户光临！</p>\\n<p>海量商品优惠大酬宾！</p>\\n<p>实惠不要错过哦～</p>\",\"dateAdd\":\"2020-08-14 09:47:03\",\"id\":15690,\"isRemind\":false,\"isShow\":true,\"remindUid\":0,\"title\":\"老店新开，欢迎新老客户光临！\",\"userId\":27},\"msg\":\"success\"}";
    }
    /**
     * 获取公告详情
     */
    @Operation(summary = "微信小程序获取公告详情免code")
    @PostMapping(value = "/wxcloud/noticeDetail1")
    NoticeDetaiResponse noticeDetail(HttpServletRequest request, @RequestBody OrderDetailRequest json) {
        return null;
    }
    @PostMapping(value = "/wxcloud/noticeDetail")
    String test1(){
        return "{\"code\":0,\"data\":{\"content\":\"<p>老店新开，欢迎新老客户光临！</p>\\n<p>海量商品优惠大酬宾！</p>\\n<p>实惠不要错过哦～</p>\",\"dateAdd\":\"2020-08-14 09:47:03\",\"id\":15690,\"isRemind\":false,\"isShow\":true,\"remindUid\":0,\"title\":\"老店新开，欢迎新老客户光临！\",\"userId\":27},\"msg\":\"success\"}";
    }


    /**
     * 添加留言-评论
     */
    @Operation(summary = "建议反馈")
    @PostMapping("/wxcloud/addComment")
    AddCommentResponse addComment(HttpServletRequest request, @RequestBody AddCommentRequest json){
        return null;
    }


}
